<?xml version="1.0" encoding="UTF-8"?><!--Test-->
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:java="http://xml.apache.org/xslt/java" xmlns:xalan="http://xml.apache.org/xalan" exclude-result-prefixes="xalan java fo"> 

<xsl:output method="html" encoding="UTF-8" doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/>
<xsl:param name="DMS_SESSION_ID" select="'default value'"/> 
<<<<<<< .mine
<xsl:param name="DMS_INPUT_OBJECT_ID"/>Test
=======
<xsl:param name="DMS_INPUT_OBJECT_ID"/>sdfasdf
>>>>>>> .r5

<!-- Variables Section Begin -->

<!-- Paths & Folders Variables -->
<xsl:variable name="site_path">/content/communications/dolphin</xsl:variable>
<xsl:variable name="default_image_folder">images</xsl:variable>
<!-- Paragraph Class: set the class name of the pragraph section -->
<xsl:variable name="para_class">featureshome</xsl:variable>
<!-- Set the section name here. thsis setting will affect the menu button apperance -->
<!-- Sub-section would only show if the section is set to current_issue -->
<!-- Section can be current_issue/archives/contact -->
<xsl:variable name="section">archives</xsl:variable>
<!-- Sub section can be features/leadership/events_highlights/people/in_the_news -->
<xsl:variable name="sub_section">features</xsl:variable>
<!-- Set the page title here. -->
<xsl:variable name="page_title" select="/dolphin_archive/page_title"/>

<!-- Query Issue Variables -->
<xsl:variable name = "latestIssueQuery">
    SELECT title FROM dolphin_issue WHERE object_name = (SELECT MAX(object_name) FROM dolphin_issue)
</xsl:variable> 

<xsl:variable name = "latestIssueQueryResult"> 
    <xsl:call-template name="XDQL"> 
        <xsl:with-param name="dql" select="string($latestIssueQuery)"/> 
    </xsl:call-template> 
</xsl:variable> 

<!-- This and Latest Issue Variable -->
<xsl:variable name="latestIssue" select="xalan:nodeset($latestIssueQueryResult)/xdql/object/title"/> 
<xsl:variable name="thisIssue" select="/dolphin_archive/issue"/>
<!-- The "thisIssue" variable could be retrieve from the document itself if the document contains a content -->
<!-- If the page is a listing page, it is most likely that the document is a currnet issue by default -->
<!-- <xsl:variable name="thisIssue" select="/dolphin_document/issue"/> -->

<!-- Get Navigation Link From Dolphin Link Object -->
<xsl:variable name = "linkQuery">
    SELECT link_name, link_url FROM dolphin_link
</xsl:variable>

<xsl:variable name = "linkQueryResult"> 
    <xsl:call-template name="XDQL"> 
        <xsl:with-param name="dql" select="string($linkQuery)"/> 
    </xsl:call-template> 
</xsl:variable> 

<xsl:variable name="links"> 
    <xsl:for-each select="xalan:nodeset($linkQueryResult)/xdql/object"> 
        <xsl:element name="{link_name}">
        <xsl:value-of select="link_url"/>
        </xsl:element>
    </xsl:for-each> 
</xsl:variable>

<!-- Site Links From DQL -->
<xsl:variable name="home_page" select="xalan:nodeset($links)/home"/>
<xsl:variable name="archives_page" select="xalan:nodeset($links)/archives"/>
<xsl:variable name="contact_us_page" select="xalan:nodeset($links)/contact_us"/>
<xsl:variable name="features_page" select="xalan:nodeset($links)/features"/>
<xsl:variable name="leadership_page" select="xalan:nodeset($links)/leadership"/>
<xsl:variable name="events_highlights_page" select="xalan:nodeset($links)/events_highlights"/>
<xsl:variable name="people_page" select="xalan:nodeset($links)/people"/>
<xsl:variable name="inthenews_page" select="xalan:nodeset($links)/in_the_news"/>
<xsl:variable name="editorial_board_page" select="xalan:nodeset($links)/editorial_board"/>

<!-- Variables Section End -->

<!--++++++++++++++++++++++++++++++++++++++++++++ Main Template Begins ++++++++++++++++++++++++++++++++++++++++++++-->
<xsl:template match="dolphin_archive">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <title>Dolphin Online - <xsl:value-of select="$page_title"/></title>
    <link type="text/css" rel="stylesheet" media="screen" href="/content/communications/dolphin/css/screen.css"/>
    <link type="text/css" rel="stylesheet" media="print" href="/content/communications/dolphin/css/printpreview.css"/>
    <script type="text/javascript" src="/content/communications/dolphin/js/dolphinfxns.js"><xsl:comment/></script>
</head>
<body id="dolphin">
    <div id="wrap">
        <!-- Logo Begin -->
        <xsl:call-template name="displayLogo"/>
        <!-- Logo End -->
        <!-- Main Navigation Begin -->
        <xsl:call-template name="mainNavigation">
            <xsl:with-param name="main_section" select="$section"/>
        </xsl:call-template>
        <!-- Main Navigation End -->
        <!-- Sub Navigation Begin -->
        <xsl:call-template name="subNavigation">
            <xsl:with-param name="main_section" select="$section"/>
            <xsl:with-param name="sub_section" select="$sub_section"/>
        </xsl:call-template>
        <!-- Sub Navigation End -->
        <!-- Main Body Begin -->
        <div id="main-body">
            <!-- Content Begin -->      
            <div id="content">
                <!-- Feature Begin -->
                <xsl:call-template name="featureTitle"/>
                <xsl:call-template name="featureList">
                    <xsl:with-param name="class" select="$para_class"/>
                </xsl:call-template>
                <!-- Feature End -->
                <xsl:call-template name="articleForm">
                    <xsl:with-param name="article_title" select="$page_title"/>
                    <xsl:with-param name="channel_type" select="$sub_section"/>
                </xsl:call-template>
            </div>
            <!-- Content End -->
        </div>
        <!-- Main Body End -->
        <!-- Side Bar Begin -->
        <xsl:call-template name="sidebar"/>
        <!-- Side Batd End -->
        <xsl:call-template name="displayIssue"/>
        <xsl:call-template name="space"/>
    </div>
    <!-- Footer Begin -->
    <xsl:call-template name="displayFooter"/>
    <!-- Footer End -->
</body>
</html>

</xsl:template>
<!--++++++++++++++++++++++++++++++++++++++++++++ Main Template Ends ++++++++++++++++++++++++++++++++++++++++++++-->

<!-- Feature Title Template -->
<xsl:template name="featureTitle">
        <xsl:call-template name="backLink"/>
    <xsl:call-template name="titleImage">
        <xsl:with-param name="title_img">images/headings/featuresarchive.gif</xsl:with-param>
        <xsl:with-param name="title_str">Features Archive</xsl:with-param>
    </xsl:call-template>
</xsl:template>


<!-- Title Image Template -->
<xsl:template name="titleImage">
    <xsl:param name="title_img"/>
    <xsl:param name="title_str"/>
    <div>
        <img src="{$site_path}/{$title_img}" title="{$title_str}" alt="{title_str}"/>
    </div>
</xsl:template>

<!-- Freature List Content Template -->
<xsl:template name="featureList">
    <xsl:param name="class"/>
    <!-- Get Features Article -->
    <xsl:variable name = "articleQuery">
        SELECT DISTINCT d.r_object_id, d.i_chronicle_id, fr.r_folder_path, s.object_name, d.article_title, d.author_name, d.author_department
        FROM dm_sysobject_s s, dm_sysobject_r sr, dm_folder_r fr, dolphin_article d 
        WHERE s.r_object_id = sr.r_object_id AND s.i_has_folder = 1 AND fr.r_object_id = sr.i_folder_id 
            AND s.r_object_id = d.r_object_id AND fr.r_folder_path IS NOT NULL AND d.document_category = 'features'
            AND d.document_issue = '<xsl:value-of select="$thisIssue"/>' AND ANY d.r_version_label = 'Active'
        ORDER BY d.article_title
    </xsl:variable>
    
    <xsl:variable name = "articleQueryResult"> 
        <xsl:call-template name="XDQL_Content"> 
            <xsl:with-param name="dql" select="string($articleQuery)"/> 
        </xsl:call-template> 
    </xsl:variable>
    
    <xsl:variable name="article" select="xalan:nodeset($articleQueryResult)/xdql/object"/>
    
    
    
    <div class="features">
        <h5 class="monthyear">
            <xsl:call-template name="getFullIssueString">
                <xsl:with-param name="issue_str" select="$thisIssue"/>
            </xsl:call-template>
        </h5>
        <div class="featuesinner">
        <xsl:for-each select="$article">
            <xsl:variable name="name" select="object_name" />        
            <xsl:variable name="path" select="substring-after(r_folder_path,'/Dolphin/')" />    
            <div class="fullfloat">
                <p>
                <a href="{$site_path}/{$path}/{$name}.html">
                <xsl:for-each select="content/dolphin_article/title">
                <xsl:call-template name="applyTemplates">
                    <xsl:with-param name="stripTag1">span</xsl:with-param>
                    <xsl:with-param name="stripTag2">p</xsl:with-param>
                    <xsl:with-param name="stripTag3">div</xsl:with-param>
                    <xsl:with-param name="includeAttributes">no</xsl:with-param>
                </xsl:call-template>
                </xsl:for-each>
                </a>
                <br/>
                <span class="authorpub">
                    <xsl:value-of select="author_name"/>
                    <xsl:if test="author_name = ''">
                    <xsl:value-of select="author_department"/>
                    </xsl:if>
                </span>
                </p>
            </div>
            <div class="spacer"/>
        </xsl:for-each>
        </div>
    </div>
</xsl:template>

<!-- General Section Begin -->

<!-- Display Logo Template -->
<xsl:template name="displayLogo">
    <div id="logo">
        <a href="{$site_path}/{$home_page}" title="The Dolphin">
            <img src="{$site_path}/{$default_image_folder}/logo.jpg" 
                width="752" height="79" border="0" alt="The Dolphin" title="The Dolphin"/>
        </a>
    </div>  
</xsl:template>

<!-- Display Footer Template -->
<xsl:template name="displayFooter">
    <div id="footer">
        <p>
        <a href="{$site_path}/{$home_page}">Home</a> | 
        <a href="{$site_path}/{$editorial_board_page}">Editorial Board</a> | 
        <a href="{$site_path}/{$contact_us_page}">Contact Us</a><br/>
        <script language="JavaScript">writeFooter();</script>
        </p>
    </div>
</xsl:template>

<!-- Display Issue Template -->
<xsl:template name="displayIssue">
    <ul id="issuetext">
        <li>
        <xsl:call-template name="getFullIssueString">
            <xsl:with-param name="issue_str" select="$thisIssue"/>
        </xsl:call-template>
        <xsl:if test="$section != 'current_issue'"> (Archive)</xsl:if>
        </li>
    </ul>
</xsl:template>

<!-- Back Link Template -->
<xsl:template name="backLink">
    <div id="backlink">
        <a onmouseover="swapImages('back','0','on');" 
        onmouseout="swapImages('back','0','off');" 
        href="{$site_path}/{$archives_page}">
        <img title="Back" src="{$site_path}/{$default_image_folder}/buttons/back_off.gif" 
        name="back0" id="back0" border="0" alt="Back"/>
        </a>
    </div>
</xsl:template>

<!-- General Section End -->

<!-- Sidebar Template Section Begin -->

<!-- Sidebar Template -->
<xsl:template name="sidebar">
    <div id="sidebar">
        <!-- Applying Related Links Template -->
        <xsl:call-template name="relatedLinks">
            <xsl:with-param name="enable">true</xsl:with-param>
            <xsl:with-param name="background">graybg</xsl:with-param>
        </xsl:call-template>
        <!-- Applying Sidebar Content Template -->
        <xsl:call-template name="sidebarContent">
                <xsl:with-param name="background">lightgraybg</xsl:with-param>
        </xsl:call-template>
        <xsl:variable name="toolsBackground">
            <xsl:choose>
                <xsl:when test="sidebar_text = '' and sidebar_image = ''">lightgraybg</xsl:when>
                <xsl:otherwise>graybg</xsl:otherwise>
            </xsl:choose>
        </xsl:variable>
        <!-- Applying Sidebar Tools Template -->
        <xsl:call-template name="sidebarTools">
                <xsl:with-param name="background" select="$toolsBackground"/>
                <xsl:with-param name="disablePrintArticle">true</xsl:with-param>
                <xsl:with-param name="disableResponseToThisArticle">true</xsl:with-param>
        </xsl:call-template>
    </div>
</xsl:template>

<!-- Related Links Template -->
<xsl:template name="relatedLinks">
    <xsl:param name="enable">true</xsl:param>
    <xsl:param name="background">graybg</xsl:param> <!-- graybg / lightgraybg -->
    <xsl:if test="$enable = 'true'">
        <div class="{$background}">
        <h3>
        <img src="{$site_path}/{$default_image_folder}/rightnav/relatedlinks.gif" alt="Related Links" title="Related Links"/>
        </h3>
        <ul id="dolphinside">
            <li>
            <xsl:variable name="default_link">
                <xsl:choose>
                    <xsl:when test="$section != 'current_issue' and $sub_section = 'features'">
                        <xsl:value-of select="$features_page"/>
                    </xsl:when>
                    <xsl:when test="$section != 'current_issue' and $sub_section = 'leadership'">
                        <xsl:value-of select="$leadership_page"/>
                    </xsl:when>
                    <xsl:when test="$section != 'current_issue' and $sub_section = 'in_the_news'">
                        <xsl:value-of select="$inthenews_page"/>
                    </xsl:when>
                    <xsl:when test="$section != 'current_issue' and $sub_section = 'events_highlights'">
                        <xsl:value-of select="$events_highlights_page"/>
                    </xsl:when>
                    <xsl:when test="$section != 'current_issue' and $sub_section = 'people'">
                        <xsl:value-of select="$people_page"/>
                    </xsl:when>
                    <xsl:when test="$section = 'current_issue' and $sub_section = 'features'">
                        <xsl:value-of select="$archives_page"/>#features</xsl:when>
                    <xsl:when test="$section = 'current_issue' and $sub_section = 'leadership'">
                        <xsl:value-of select="$archives_page"/>#leadership</xsl:when>
                    <xsl:when test="$section = 'current_issue' and $sub_section = 'in_the_news'">
                        <xsl:value-of select="$archives_page"/>#inthenews</xsl:when>
                    <xsl:when test="$section = 'current_issue' and $sub_section = 'events_highlights'">
                        <xsl:value-of select="$archives_page"/>#eventshighlights</xsl:when>
                    <xsl:when test="$section = 'current_issue' and $sub_section = 'people'">
                        <xsl:value-of select="$archives_page"/>#people</xsl:when>
                    <xsl:when test="$section = 'current_issue' and $sub_section = ''">
                        <xsl:value-of select="$archives_page"/></xsl:when>
                    <xsl:otherwise><xsl:value-of select="$home_page"/></xsl:otherwise>
                </xsl:choose>
            </xsl:variable>
            <a href="{$site_path}/{$default_link}">
            <xsl:choose>
                <xsl:when test="$section != 'current_issue' and $sub_section = 'features'">
                    Current Features
                </xsl:when>
                <xsl:when test="$section != 'current_issue' and $sub_section = 'leadership'">
                    Current Leadership
                </xsl:when>
                <xsl:when test="$section != 'current_issue' and $sub_section = 'in_the_news'">
                    Current In the News
                </xsl:when>
                <xsl:when test="$section != 'current_issue' and $sub_section = 'events_highlights'">
                    Current Events &amp; Highlights
                </xsl:when>
                <xsl:when test="$section != 'current_issue' and $sub_section = 'people'">
                    Current People
                </xsl:when>
                <xsl:when test="$section = 'current_issue' and $sub_section = 'features'">
                    Features Archives
                </xsl:when>
                <xsl:when test="$section = 'current_issue' and $sub_section = 'leadership'">
                    Leadership Archives
                </xsl:when>
                <xsl:when test="$section = 'current_issue' and $sub_section = 'in_the_news'">
                    In the News Archives
                </xsl:when>
                <xsl:when test="$section = 'current_issue' and $sub_section = 'events_highlights'">
                    Events &amp; Highlights Archives
                </xsl:when>
                <xsl:when test="$section = 'current_issue' and $sub_section = 'people'">
                    People Archives
                </xsl:when>
                <xsl:when test="$section = 'current_issue' and $sub_section = ''">
                    Archives
                </xsl:when>
                <xsl:otherwise>Dolphin Home</xsl:otherwise>
            </xsl:choose>
            </a>
            </li>
        <xsl:for-each select="related_link">
            <xsl:variable name="target">
                <xsl:if test="contains(link_url,'http') or contains(link_url,'pdf') or contains(link_url,'xsl')">_blank</xsl:if>
            </xsl:variable>
            <xsl:if test="link_text != ''">
                <li>
                    <a href="{link_url}" target="{$target}">
                    <xsl:for-each select="link_text">
                        <xsl:call-template name="applyTemplates">
                            <xsl:with-param name="stripTag1">span</xsl:with-param>
                            <xsl:with-param name="stripTag2">p</xsl:with-param>
                            <xsl:with-param name="stripTag3">div</xsl:with-param>
                            <xsl:with-param name="includeAttributes">no</xsl:with-param>
                        </xsl:call-template>
                    </xsl:for-each>
                    </a>
                </li>
            </xsl:if>
        </xsl:for-each>
        </ul>
        </div>
    </xsl:if>
</xsl:template>

<!-- Sidebar Content Template -->
<xsl:template name="sidebarContent">
    <xsl:param name="background">graybg</xsl:param> <!-- graybg / lightgraybg -->
    <xsl:if test="sidebar_text != '' or (sidebar_image != '' and contains(sidebar_image,'.'))">
    <xsl:variable name="class">
        <xsl:choose>
            <xsl:when test="sidebar_text != '' and sidebar_image = ''">sidebarpaddingtext</xsl:when>
            <xsl:otherwise>pullquotepadding</xsl:otherwise>
        </xsl:choose>
    </xsl:variable>
    <div class="{$background}">
    <div class="{$class}">
        <!-- Applying Sidebar Text -->
        <xsl:for-each select="sidebar_text">
            <xsl:call-template name="applyTemplates">
                <xsl:with-param name="stripTag1">span</xsl:with-param>
                <xsl:with-param name="stripTag2">font</xsl:with-param>
                <xsl:with-param name="stripTag3">div</xsl:with-param>
                <xsl:with-param name="includeAttributes">no</xsl:with-param>
            </xsl:call-template>
        </xsl:for-each>
        <!-- Applying Sidebar Image -->
        <xsl:if test="contains(sidebar_image,'.')">
        <xsl:choose>
            <xsl:when test="sidebar_image != '' and sidebar_image_url != ''">
                <a href="{sidebar_image_url}">
                    <img src="{$site_path}/{sidebar_image}"/>
                </a>
            </xsl:when>
                <xsl:otherwise>
                    <img src="{$site_path}/{sidebar_image}"/>
                </xsl:otherwise>
        </xsl:choose>
        </xsl:if>
        <!-- Applying Sidebar Image Caption -->
        <xsl:if test="sidebar_image != '' and sidebar_image_caption != ''">
            <div class="caption">
                <xsl:value-of select="sidebar_image_caption"/>
            </div>
        </xsl:if>
    </div>
    </div>
    </xsl:if>
</xsl:template>


<!-- Sidebar Tools Template -->
<xsl:template name="sidebarTools">
    <xsl:param name="background">graybg</xsl:param> <!-- graybg / lightgraybg -->
    <xsl:param name="disablePrintArticle">false</xsl:param>
    <xsl:param name="disableResponseToThisArticle">false</xsl:param>
    <xsl:param name="disableProvideFeedback">false</xsl:param>
    <xsl:param name="disableSummitArticleIdea">false</xsl:param>
    <xsl:if 
    test="$disablePrintArticle = 'false' or $disableResponseToThisArticle = 'false' or $disableSummitArticleIdea = 'false'">
    <div class="{$background}">
        <div class="sidebarpadding">
            <h3><img src="{$site_path}/{$default_image_folder}/rightnav/tools.gif" alt="Tools" title="Tools"/></h3>
            <ul id="tools">
                <xsl:if test="$disablePrintArticle = 'false'"> <!-- Print Friendly Version -->
                <li class="print" onmouseover="return showStatus('Print this Article');" 
                onmouseout="return showStatus('');">
                <a href="#" onmouseover="showStatus('Print this Article');" onmouseout="showStatus('');" 
                onclick="printPage();return false;">Print this article</a></li>
                </xsl:if>
                <xsl:if test="$disableResponseToThisArticle = 'false'"> <!-- Response to This Article -->
                <li class="respond" onmouseover="return showStatus('javascript:respondToThisArticle();');" 
                onmouseout="return showStatus('');" onclick="javascript:respondToThisArticle();">
                <a href="javascript:respondToThisArticle();">Respond to This Article</a></li>
                </xsl:if>
                <xsl:if test="$disableProvideFeedback = 'false'"> <!-- Response to This Article -->
                <li class="provide" onmouseover="return showStatus('javascript:provideFeedback();');" 
                onmouseout="return showStatus('');" onclick="javascript:provideFeedback();">
                <a href="javascript:provideFeedback();">Provide Feedback</a></li>
                </xsl:if>
                <xsl:if test="$disableSummitArticleIdea = 'false'"> <!-- Summit Article Idea -->
                <li class="submit" onmouseover="return showStatus('javascript:submitArticleIdeas();');" 
                onmouseout="return showStatus('');" onclick="javascript:submitArticleIdeas();">
                <a href="javascript:submitArticleIdeas();">Submit an Article Idea</a></li>
                </xsl:if>
            </ul>
        </div>
    </div>
    </xsl:if>
</xsl:template>

<!-- Sidebar Template Section End -->

<!-- Article Form -->
<xsl:template name="articleForm">
    <xsl:param name="article_title"/>
    <xsl:param name="channel_type"/>
    <form name="articleForm" id="articleForm" method="post">
        <input type="hidden" name="articletitle" value="{$article_title}"/>
        <input type="hidden" name="articleurl"/>
        <input type="hidden" name="channelType" value="{$channel_type}"/>
        <input type="hidden" name="doctitle"/>
        <input type="hidden" name="createDate"/>
    </form>
</xsl:template>

<!-- Main Navigation Template -->
<xsl:template name="mainNavigation">
    <xsl:param name="main_section"/>
     <xsl:variable name="level">nav</xsl:variable>
    <ul id="nav">
        <li> <!-- Current Issue Menu -->
            <xsl:call-template name="menuItem">
                <xsl:with-param name="current_section" select="$main_section"/>
                <xsl:with-param name="section_name">current_issue</xsl:with-param>
                <xsl:with-param name="title">CURRENT ISSUE</xsl:with-param>
                <xsl:with-param name="nav_level" select="$level"/>
                <xsl:with-param name="nav_number">0</xsl:with-param>
                <xsl:with-param name="link_to" select="$home_page"/>
                <xsl:with-param name="img_name">current_issue</xsl:with-param> 
            </xsl:call-template>
        </li>
        <li> <!-- Archives Issue Menu -->
            <xsl:call-template name="menuItem">
                <xsl:with-param name="current_section" select="$main_section"/>
                <xsl:with-param name="section_name">archives</xsl:with-param>
                <xsl:with-param name="title">ARCHIVES</xsl:with-param>
                <xsl:with-param name="nav_level" select="$level"/>
                <xsl:with-param name="nav_number">1</xsl:with-param>
                <xsl:with-param name="link_to" select="$archives_page"/>
                <xsl:with-param name="img_name">archives</xsl:with-param> 
            </xsl:call-template>
        </li>
        <li> <!-- Contact Us Menu -->
            <xsl:call-template name="menuItem">
                <xsl:with-param name="current_section" select="$main_section"/>
                <xsl:with-param name="section_name">contact</xsl:with-param>
                <xsl:with-param name="title">CONTACT US</xsl:with-param>
                <xsl:with-param name="nav_level" select="$level"/>
                <xsl:with-param name="nav_number">2</xsl:with-param>
                <xsl:with-param name="link_to" select="$contact_us_page"/>
                <xsl:with-param name="img_name">contact</xsl:with-param> 
            </xsl:call-template>
        </li>
    </ul>
</xsl:template>

<!-- Sub Navigation Template -->
<xsl:template name="subNavigation">
    <xsl:param name="main_section"/>
    <xsl:param name="sub_section"/>
    <xsl:variable name="level">subnav</xsl:variable>
    <xsl:if test="$main_section = 'current_issue'">
    <ul id="subnav">
        <li> <!-- Features Menu -->
            <xsl:call-template name="menuItem">
                <xsl:with-param name="current_section" select="$sub_section"/>
                <xsl:with-param name="section_name">features</xsl:with-param>
                <xsl:with-param name="title">FEATURES</xsl:with-param>
                <xsl:with-param name="nav_level" select="$level"/>
                <xsl:with-param name="nav_number">0</xsl:with-param>
                <xsl:with-param name="link_to" select="$features_page"/>
                <xsl:with-param name="img_name">features</xsl:with-param> 
            </xsl:call-template>
        </li>
        <li> <!-- Leadership Menu -->
            <xsl:call-template name="menuItem">
                <xsl:with-param name="current_section" select="$sub_section"/>
                <xsl:with-param name="section_name">leadership</xsl:with-param>
                <xsl:with-param name="title">LEADERSHIP</xsl:with-param>
                <xsl:with-param name="nav_level" select="$level"/>
                <xsl:with-param name="nav_number">1</xsl:with-param>
                <xsl:with-param name="link_to" select="$leadership_page"/>
                <xsl:with-param name="img_name">leadership</xsl:with-param> 
            </xsl:call-template>
        </li>
        <li> <!-- Events & Highlights Menu -->
            <xsl:call-template name="menuItem">
                <xsl:with-param name="current_section" select="$sub_section"/>
                <xsl:with-param name="section_name">events_highlights</xsl:with-param>
                <xsl:with-param name="title">EVENTS AND HIGHLIGHTS</xsl:with-param>
                <xsl:with-param name="nav_level" select="$level"/>
                <xsl:with-param name="nav_number">2</xsl:with-param>
                <xsl:with-param name="link_to" select="$events_highlights_page"/>
                <xsl:with-param name="img_name">events_highlights</xsl:with-param> 
            </xsl:call-template>
        </li>
        <li> <!-- People Menu -->
            <xsl:call-template name="menuItem">
                <xsl:with-param name="current_section" select="$sub_section"/>
                <xsl:with-param name="section_name">people</xsl:with-param>
                <xsl:with-param name="title">PEOPLE</xsl:with-param>
                <xsl:with-param name="nav_level" select="$level"/>
                <xsl:with-param name="nav_number">3</xsl:with-param>
                <xsl:with-param name="link_to" select="$people_page"/>
                <xsl:with-param name="img_name">people</xsl:with-param> 
            </xsl:call-template>
        </li>
        <li> <!-- In The News Menu -->
            <xsl:call-template name="menuItem">
                <xsl:with-param name="current_section" select="$sub_section"/>
                <xsl:with-param name="section_name">in_the_news</xsl:with-param>
                <xsl:with-param name="title">IN THE NEWS</xsl:with-param>
                <xsl:with-param name="nav_level" select="$level"/>
                <xsl:with-param name="nav_number">4</xsl:with-param>
                <xsl:with-param name="link_to" select="$inthenews_page"/>
                <xsl:with-param name="img_name">in_the_news</xsl:with-param> 
            </xsl:call-template>
        </li>
    </ul>
    </xsl:if>
</xsl:template>

<!-- Menu Item Template -->
<xsl:template name="menuItem">
    <xsl:param name="current_section"/>
    <xsl:param name="section_name"/>
    <xsl:param name="title"/>
    <xsl:param name="nav_level"/>
    <xsl:param name="nav_number"/>
    <xsl:param name="link_to"/>
    <xsl:param name="img_name"/>
    <xsl:choose>
        <xsl:when test="$current_section = $section_name">
            <a href="{$site_path}/{$link_to}">
            <img src="{$site_path}/{$default_image_folder}/{$nav_level}/{$img_name}_in.gif"
            title="{$title}" alt="{$title}" border="0" name="{$nav_level}{$nav_number}" id="{$nav_level}{$nav_number}"/>
            </a>
        </xsl:when>
        <xsl:otherwise>
            <a href="{$site_path}/{$link_to}" 
                onmouseover="swapImages('{$nav_level}','{$nav_number}','on');" 
                onmouseout="swapImages('{$nav_level}','{$nav_number}','off');">
            <img src="{$site_path}/{$default_image_folder}/{$nav_level}/{$img_name}_off.gif"
            title="{$title}" alt="{$title}" border="0" name="{$nav_level}{$nav_number}" id="{$nav_level}{$nav_number}"/>
            </a>
        </xsl:otherwise>
    </xsl:choose>
</xsl:template>

<!-- Full Issue String Template -->
<xsl:template name="getFullIssueString">
    <xsl:param name="issue_str"/>
    <xsl:choose>
        <xsl:when test="substring-before($issue_str,'-') = 'Jan/Feb'">January/February <xsl:value-of select="substring-after($issue_str,'-')"/></xsl:when>
        <xsl:when test="substring-before($issue_str,'-') = 'Mar/Apr'">March/April <xsl:value-of select="substring-after($issue_str,'-')"/></xsl:when>
        <xsl:when test="substring-before($issue_str,'-') = 'May/Jun'">May/June <xsl:value-of select="substring-after($issue_str,'-')"/></xsl:when>
        <xsl:when test="substring-before($issue_str,'-') = 'Jul/Aug'">July/August <xsl:value-of select="substring-after($issue_str,'-')"/></xsl:when>
        <xsl:when test="substring-before($issue_str,'-') = 'Sep/Oct'">September/October <xsl:value-of select="substring-after($issue_str,'-')"/></xsl:when>
        <xsl:when test="substring-before($issue_str,'-') = 'Nov/Dec'">November/December <xsl:value-of select="substring-after($issue_str,'-')"/></xsl:when>
    </xsl:choose>
</xsl:template>

<xsl:template name="divider">
<div class="divider"><img width="1" src="{$site_path}/images/blank.gif" height="1" alt=""/></div>
</xsl:template>

<!-- Space Template -->
<xsl:template name="space">
    <div id="push"/>
</xsl:template>

<!-- Strip Tag Template -->
<xsl:template name="applyTemplates">
    <xsl:param name="stripTag1"/>
    <xsl:param name="stripTag2"/>
    <xsl:param name="stripTag3"/>
    <xsl:param name="includeAttributes">yes</xsl:param>
    <xsl:choose>
    <xsl:when test="$stripTag1 != '' or $stripTag2 != '' or $stripTag3 != ''">
    <xsl:for-each select="*|text()">
        <xsl:choose>
        <xsl:when test="($stripTag1=name(.) or $stripTag2=name(.) or $stripTag3=name(.))and name(.)!=''">
            <xsl:call-template name="applyTemplates">
                <xsl:with-param name="stripTag1" select="$stripTag1"/>
                <xsl:with-param name="stripTag2" select="$stripTag2"/>
                <xsl:with-param name="stripTag3" select="$stripTag3"/>
                <xsl:with-param name="includeAttributes" select="$includeAttributes"/>
            </xsl:call-template>
        </xsl:when>
        <xsl:when test="name(.) != ''">
            <xsl:if test="normalize-space() != '' and normalize-space() != '&#160;'">
            <xsl:element name="{name(.)}">
            <xsl:if test="$includeAttributes = 'yes'">
            <xsl:for-each select="@*">
                <xsl:attribute name="{name(.)}">
                    <xsl:value-of select="."/>
                </xsl:attribute>
            </xsl:for-each>
            </xsl:if>
            <xsl:call-template name="applyTemplates">
                <xsl:with-param name="stripTag1" select="$stripTag1"/>
                <xsl:with-param name="stripTag2" select="$stripTag2"/>
                <xsl:with-param name="stripTag3" select="$stripTag3"/>
                <xsl:with-param name="includeAttributes" select="$includeAttributes"/>
            </xsl:call-template>
            </xsl:element>
            </xsl:if>
        </xsl:when>
        <xsl:otherwise>
            <xsl:copy-of select="."/>       
        </xsl:otherwise>
        </xsl:choose>
    </xsl:for-each>
    </xsl:when>
    <xsl:otherwise>
        <xsl:apply-templates/>
    </xsl:otherwise>
    </xsl:choose>
</xsl:template>


<!-- Matching Template -->
<xsl:template match="*|@*|comment()|processing-instruction()|text()">
  <xsl:copy>
    <xsl:apply-templates select="*|@*|comment()|processing-instruction()|text()"/>
  </xsl:copy>
</xsl:template>

<!-- XDQL Tempalte -->
<xsl:template name="XDQL"> 
    <xsl:param name="dql"/> 
    <xsl:param name="roottag" select="string('xdql')"/> 
    <xsl:param name="UpperTags" select="string('false')"/> 
    <xsl:param name="MaxRows" select="10"/> 
    <xsl:param name="RowIDAttrName" select="ID"/> 
    <xsl:param name="RowsetTag" select="Row"/> 
    <xsl:param name="UseGivenCaseTagNames" select="true"/> 
    <xsl:param name="UseNullAttrIndicator" select="false"/> 
    <xsl:variable name="xdql" select="java:com.documentum.xml.xdql.DfXmlQuery.new()"/> 
    <xsl:variable name="init" select="java:init($xdql)"/> 
    <xsl:variable name="param" select="java:setDql($xdql,$dql)"/> 
    <xsl:variable name="param1" select="java:setRootNode($xdql,$roottag)"/> 
    <xsl:variable name="param3" select="java:includeContent($xdql,false())"/> 
    <xsl:variable name="setContentEncoding" select="java:setContentEncoding($xdql,string('dom'))"/> 
    <xsl:variable name="setContentFormat" select="java:setContentFormat($xdql,string('xml'))"/> 
    <xsl:variable name="execute" select="java:execute($xdql, 'DF_READ_QUERY', $DMS_SESSION_ID)"/> 
    <xsl:variable name="queryresult" select="java:getXMLDOM($xdql)"/> 
    <xsl:copy-of select="$queryresult"/> 
</xsl:template>

<!-- XDQL_Content Tempalte -->
<xsl:template name="XDQL_Content"> 
    <xsl:param name="dql"/> 
    <xsl:param name="roottag" select="string('xdql')"/> 
    <xsl:param name="UpperTags" select="string('false')"/> 
    <xsl:param name="MaxRows" select="10"/> 
    <xsl:param name="RowIDAttrName" select="ID"/> 
    <xsl:param name="RowsetTag" select="Row"/> 
    <xsl:param name="UseGivenCaseTagNames" select="true"/> 
    <xsl:param name="UseNullAttrIndicator" select="false"/> 
    <xsl:variable name="xdql" select="java:com.documentum.xml.xdql.DfXmlQuery.new()"/> 
    <xsl:variable name="init" select="java:init($xdql)"/> 
    <xsl:variable name="param" select="java:setDql($xdql,$dql)"/> 
    <xsl:variable name="param1" select="java:setRootNode($xdql,$roottag)"/> 
    <xsl:variable name="param3" select="java:includeContent($xdql,true())"/> 
    <xsl:variable name="setContentEncoding" select="java:setContentEncoding($xdql,string('dom'))"/> 
    <xsl:variable name="setContentFormat" select="java:setContentFormat($xdql,string('xml'))"/> 
    <xsl:variable name="execute" select="java:execute($xdql, 'DF_READ_QUERY', $DMS_SESSION_ID)"/> 
    <xsl:variable name="queryresult" select="java:getXMLDOM($xdql)"/> 
    <xsl:copy-of select="$queryresult"/> 
</xsl:template>


</xsl:stylesheet>
